#!/usr/bin/python

from MomentClosure import OutputAsMaple
from MomentClosure.GlobalVariables import globalVariables


def generateFiles(file_name, upto):

    print 'Doing %s' % file_name
    sbml = 'xml_models/' + file_name + '.xml'
    for i in range(upto):
        globalVariables(closure_order=i+1)
        output = 'maple_files/%s%s.mw' % (file_name, str(i+1))
        print 'Doing %s' % output        
        OutputAsMaple.createMapleFile(sbml_file=sbml, output_file=output)

if __name__ == '__main__':
    generateFiles('dim', 4)
    generateFiles('id', 4)
    generateFiles('hsp90model', 2)    
    generateFiles('mm', 4)
    generateFiles('lac-operon', 3)
